home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 February: Tool Chest / Dev.CD Feb 00 TC.toast / pc / what's new? / sample code / human interface toolbox / packagetool / packagetool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-02  |  2.5 KB  |  110 lines

  1. /*
  2.     file PackageTool.h
  3.     
  4.     Description:
  5.     This file contains constant declarations and exported routine prototypes
  6.     used in the PackageTool application.
  7.     
  8.     PackageTool is an application illustrating how to create application
  9.     packages in Mac OS 9.  It provides a simple interface for converting
  10.     correctly formatted folders into packages and vice versa.
  11.  
  12.     Copyright: © 1999 by Apple Computer, Inc.
  13.     all rights reserved.
  14.     
  15.     Disclaimer:
  16.     You may incorporate this sample code into your applications without
  17.     restriction, though the sample code has been provided "AS IS" and the
  18.     responsibility for its operation is 100% yours.  However, what you are
  19.     not permitted to do is to redistribute the source as "DSC Sample Code"
  20.     after having made changes. If you're going to re-distribute the source,
  21.     we require that you make it clear in the source that the code was
  22.     descended from Apple Sample Code, but that you've made changes.
  23.     
  24.     Change History (most recent first):
  25.     10/19/99 created
  26. */
  27.  
  28. #ifndef __PACKAGETOOL__
  29. #define __PACKAGETOOL__
  30.  
  31. #define TARGET_CARBON 1
  32.  
  33. #include <MacTypes.h>
  34. #include <Collections.h>
  35.  
  36. enum {
  37.     kAppCreatorType = 'pTeZ',
  38.     kAppPrefsType = 'PREF'
  39.     
  40. };
  41.  
  42.     /* apple menu constants */
  43. enum {
  44.     mApple = 128,
  45.     iAbout = 1,
  46.     iFirstAppleItem = 3
  47. };
  48.  
  49.     /* file menu constants */
  50. enum {
  51.     mFile = 129,
  52.     iQuit = 1
  53. };
  54.  
  55.     /* edit menu constants */
  56. enum {
  57.     mEdit = 130,
  58.     iUndo = 1,
  59.     iCut = 3,
  60.     iCopy = 4,
  61.     iPaste = 5,
  62.     iClear = 6
  63. };
  64.  
  65. enum {    /* the main menu bar resource */
  66.     kMenuBarResource = 128
  67. };
  68.  
  69.     /* alert id numbers */
  70. enum {
  71.     kPackageDidNotVerify = 129,
  72.     kFailedToCreatePackage = 130,
  73.     kOpenAppFailedAlert = 135,
  74.     kMainFailedAlert = 136,
  75.     kAboutBoxAlert = 137,
  76.     kRerouteFailedAlert = 138
  77. };
  78.  
  79.     /* main string list resource constants */
  80. enum {
  81.     kMainStringList = 128,
  82.     kNotAFolder = 1,
  83.     kBundleAlreadySet = 2,
  84.     kBrokenAlias = 3,
  85.     kMoreThanOneAlias = 4,
  86.     kMainOutsideOfPackage = 6,
  87.     kNoAliasPresent = 7,
  88.     kInSameDirectory = 8,
  89.     kFileSharingOn = 9,
  90.     kAliasRefersToFolder = 10,
  91.     kAliasRedirectFolderName = 11,
  92.     kRedirectAliasName = 12,
  93.     kErrorRedirectingAlias = 13
  94. };
  95.  
  96.     
  97. /* routine prototypes */
  98.  
  99. /* ParamAlert is a general alert handling routine. It calls AEInteractWithUser
  100.     to ensure the application is in the forground, and then it displays an alert
  101.     after passing the s1 and s2 parameters to ParamText. */
  102. OSStatus ParamAlert(short alertID, StringPtr s1, StringPtr s2);
  103.  
  104.  
  105. /* GetCollectedPreferences returns the collection that is used for storing
  106.     application preferences. */
  107. Collection GetCollectedPreferences(void);
  108.  
  109. #endif
  110.